package org.whh.metadata.metamodel.base;

import lombok.Data;

import java.io.Serializable;
import java.util.Date;


/**
 * @Version v1.0
 * @Author Ryan
 * @Date 2021/7/10
 * N-G-P
 * metadata base info
 * extend this class to extend  your own entity
 */
@Data
public abstract class AbstractMeta implements Serializable {

    private static final long serialVersionUID = 202107101314L;

    private String metaCode;

    private String metaName;

    private Date createTime;

    private Date updateTime;


    public AbstractMeta(String metaCode,String metaName){
        this.metaCode = metaCode;
        this.metaName = metaName;
        this.createTime = new Date();
    }

    public AbstractMeta(String metaCode){
        this.metaName = metaCode;
        this.metaCode = metaCode;
        this.createTime = new Date();
    }

    @Override
    public String toString() {
        return "AbstractMeta{" +
                "metaCode='" + metaCode + '\'' +
                ", metaName='" + metaName + '\'' +
                '}';
    }
}
